Skip to content

Big refactor: get rid of parallel/async/serial features and instead use hierarchy to separate them#74

Closed
Alogani wants to merge 5 commits intodevelfrom
big_refactor
Closed

Big refactor: get rid of parallel/async/serial features and instead use hierarchy to separate them#74
Alogani wants to merge 5 commits intodevelfrom
big_refactor

Conversation

@Alogani
Copy link
Copy Markdown
Owner

@Alogani Alogani commented Jan 29, 2026

Hi @khanhtranngoccva,

Because PR #73 will make big change to the existing "core" folder, i think i will merge before my branch "big_refactor" (it will be a major release : 0.5.0).

I hesitated to merge it at first because i didn't achieve async support. But if i don't merge it now, easy_fuser crate will drift away and i won't be able to merge it later.

For your information, here are the main changes :

  • don't rely on conditional compilation of parallel/async/serial features, instead the final user will use easy_fuser/fuse_parallel, easy_fuser/fuse_serial, etc
  • put the actual macro by examples of fuse_driver inside its own macro crate (can be a drawback)

PROS :

  • better readability by separating each modes (parallel / async / serial)
  • for now, not completely get rids of traits because it conditions dependencies, so...
  • Having documentation on doc.rs cover all modes
  • potential easier separation to allow more differences between each mode
  • facilitate future support of async (at least i think so ?!)

CONS :

  • same logic could be duplicated in each mode (for now, not because everything will e in the macro crate), forcing to make changes at multiple different places
  • make the use of a crate macro (can be a source of complexity)
  • breaking change in API

I will wait to make that change in case you have a different opinion.

@Alogani
Copy link
Copy Markdown
Owner Author

Alogani commented Jan 29, 2026

In any case, your other PRs #68 & #72 will be merged first in 0.4.x branch before this PR

@khanhtranngoccva
Copy link
Copy Markdown
Contributor

khanhtranngoccva commented Jan 30, 2026

I agree with the changes. Overusing macros may lead to problems down the line where code completion tools become very hard to use. Additionally, the async feature may require a whole different underlying implementation using an async port of fuser to speed up performance and prevent the creation of too many threads, especially to take advantage of new things like io_uring. On the serial/parallel side, the fuser library seem to be working on new changes that allow cloning a FUSE session and running the filesystem on multiple threads.

The caveat is that the inode mapping module, as well as the HybridId types I introduced, has to be reworked towards two variants - one for synchronous and the other for async.

@Alogani
Copy link
Copy Markdown
Owner Author

Alogani commented Jan 30, 2026

Thanks for your insight.

You normally won't have to rework your inode mapping module and the HybridId ; those parts are common to all modes and are left untouched by my PR (it is only a reorganization). And because i will merge first your PR, i will take that into account.

However it might indeed affect #73 or other changes you made.

I think i will be able to do all changes this weekend :

@Alogani Alogani closed this Jan 31, 2026
@Alogani Alogani deleted the big_refactor branch February 1, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants